<!DOCTYPE html>
<!-- saved from url=(0052)http://www.yuanxiaoxiang.com:8008/hospital/sel/login -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <title>医院</title>
    <link rel="icon" th:href="@{/hospital/timg.jpg}">
    <link rel="stylesheet" th:href="@{/hospital/layui/css/layui.css}" media="all">
    <link rel="stylesheet" th:href="@{/hospital/css/index.css}" media="all">
    <link id="layuicss-layer" rel="stylesheet" th:href="@{/hospital/layui/css/layer.css}" media="all">
    <link id="font_400842_q6tk84n9ywvu0udi" rel="stylesheet" th:href="@{/css/font_400842_q6tk84n9ywvu0udi.css}"
          media="all">
</head>
<body class="main_body">
<div class="layui-layout layui-layout-admin">
    <!-- 顶部 -->
    <div class="layui-header header">
        <div class="layui-main mag0">
            <a href="http://www.yuanxiaoxiang.com:8008/hospital/sel/login#" class="logo">医院管理</a>
            <!-- 显示/隐藏菜单 -->
            <a href="javascript:;" class="seraph hideMenu icon-caidan"></a>
            <!-- 顶部右侧菜单 -->
            <ul class="layui-nav top_menu">
                <li class="layui-nav-item" pc="">
                    <a href="javascript:;"><i class="layui-icon" data-icon=""></i><span id="time">2022年11月10日     17:19:37</span></a>
                </li>
                <li class="layui-nav-item" id="userInfo">
                    <a href="javascript:;"><cite class="adminName"><span>超级管理员</span></cite><span
                            class="layui-nav-more"></span></a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;"
                               data-url="../toUpdateLogin;jsessionid=02C1FEA2624B3ED78264A25B8AA00C19?userid=1"><i
                                class="seraph icon-ziliao" data-icon="icon-ziliao"></i><cite>个人资料</cite></a>
                        </dd>

                        <dd><a href="/toLogin" class="signOut"><i
                                class="seraph icon-tuichu"></i><cite>退出</cite></a></dd>
                    </dl>
                </li>
                <span class="layui-nav-bar"></span></ul>
        </div>
    </div>
    <!-- 左侧导航 -->
    <div class="layui-side layui-bg-black">
        <div class="user-photo">
            <a class="img" title="我的头像"><img th:src="@{/hospital/timg.jpg}" class="userAvatar"></a>
            <p>你好！<span>超级管理员</span>, 欢迎登录</p>
        </div>

        <div class="navBar layui-side-scroll" id="navBar" style="height: 532px;">
            <ul class="layui-nav layui-nav-tree" style="height: 627px;">
                <li class="layui-nav-item layui-this"><a data-url="/page/main.html">
                    <i class="layui-icon" data-icon=""></i><cite>后台首页</cite></a></li>
                <li class="layui-nav-item"><a><i class="layui-icon" data-icon=""></i><cite>门诊管理</cite><span
                        class="layui-nav-more"></span></a>
                    <dl class="layui-nav-child">
                        <dd><a data-url="rep/toRegister"><i class="layui-icon" data-icon=""></i><cite>用户挂号</cite></a>
                        </dd>
                        <dd><a data-url="rep/cc"><i class="layui-icon" data-icon=""></i><cite>处方划价</cite></a>
                        </dd>
                        <dd><a data-url="rep/xiang"><i class="layui-icon" data-icon=""></i><cite>项目划价</cite></a>
                        </dd>
                        <dd><a data-url="rep/xiangfei"><i class="layui-icon"
                                                              data-icon=""></i><cite>项目缴费</cite></a></dd>
                        <dd><a data-url="rep/seljian"><i class="layui-icon" data-icon=""></i><cite>项目检查</cite></a>
                        </dd>
                        <dd><a data-url="rep/out"><i class="layui-icon" data-icon=""></i><cite>药品缴费</cite></a>
                        </dd>
                        <dd><a data-url="rep/haun"><i class="layui-icon"
                                                             data-icon=""></i><cite>门诊患者库</cite></a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a><i class="layui-icon" data-icon=""></i><cite>住院管理</cite><span
                        class="layui-nav-more"></span></a>
                    <dl class="layui-nav-child">
                        <dd><a data-url="liao/admin"><i class="layui-icon" data-icon=""></i><cite>入院登记</cite></a>
                        </dd>
                        <dd><a data-url="liao/pay"><i class="layui-icon" data-icon=""></i><cite>缴费管理</cite></a>
                        </dd>
                        <dd><a data-url="liao/drug"><i class="layui-icon" data-icon=""></i><cite>药品记账</cite></a>
                        </dd>
                        <dd><a data-url="liao/item"><i class="layui-icon" data-icon=""></i><cite>项目记账</cite></a>
                        </dd>
                        <dd><a data-url="liao/leave"><i class="layui-icon" data-icon=""></i><cite>出院结算</cite></a>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a><i class="layui-icon" data-icon=""></i><cite>系统管理</cite><span
                        class="layui-nav-more"></span></a>
                    <dl class="layui-nav-child">
                        <dd><a data-url="../toMenuManager"><i class="layui-icon"
                                                              data-icon=""></i><cite>菜单管理</cite></a></dd>
                        <dd><a data-url="../toLoadAllRole"><i class="layui-icon"
                                                              data-icon=""></i><cite>角色管理</cite></a></dd>
                        <dd><a data-url="../toLoadAllUser"><i class="layui-icon"
                                                              data-icon=""></i><cite>用户管理</cite></a></dd>
                        <dd><a data-url="../icon"><i class="layui-icon" data-icon=""></i><cite>图标管理</cite></a></dd>
                        <dd><a data-url="../druid"><i class="layui-icon" data-icon=""></i><cite>数据源监控</cite></a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a><i class="layui-icon" data-icon=""></i><cite>统计管理</cite><span
                        class="layui-nav-more"></span></a>
                    <dl class="layui-nav-child">
                        <dd><a data-url="../toReportFinance"><i class="layui-icon"
                                                                data-icon=""></i><cite>门诊月度统计</cite></a></dd>
                        <dd><a data-url="../toZhuYaunManage"><i class="layui-icon"
                                                                data-icon=""></i><cite>住院月度统计</cite></a></dd>
                        <dd><a data-url="../toBingYear"><i class="layui-icon" data-icon=""></i><cite>门诊年度统计</cite></a>
                        </dd>
                        <dd><a data-url="../toBing2"><i class="layui-icon" data-icon=""></i><cite>住院年度统计</cite></a>
                        </dd>
                        <dd><a data-url="../toDoctorDuibi"><i class="layui-icon" data-icon=""></i><cite>医生统计对比</cite></a>
                        </dd>
                        <dd><a data-url="../toCurrent"><i class="layui-icon" data-icon=""></i><cite>门诊当天统计</cite></a>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a><i class="layui-icon" data-icon=""></i><cite>数据中心</cite><span
                        class="layui-nav-more"></span></a>
                    <dl class="layui-nav-child">
                        <dd><a data-url="../toDepartments"><i class="layui-icon"
                                                              data-icon=""></i><cite>科室中心</cite></a></dd>
                        <dd><a data-url="../toDoctor"><i class="layui-icon" data-icon=""></i><cite>医生列表</cite></a>
                        </dd>
                        <dd><a data-url="../toArea"><i class="layui-icon" data-icon=""></i><cite>药品产地</cite></a></dd>
                        <dd><a data-url="../toProjectTypeManage"><i class="layui-icon"
                                                                    data-icon=""></i><cite>项目大类</cite></a></dd>
                        <dd><a data-url="../toRegisteredType"><i class="layui-icon" data-icon=""></i><cite>挂号类型</cite></a>
                        </dd>
                        <dd><a data-url="../toWarehuose"><i class="layui-icon" data-icon=""></i><cite>仓库</cite></a>
                        </dd>
                        <dd><a data-url="../toSkull"><i class="layui-icon" data-icon=""></i><cite>经办人</cite></a></dd>
                        <dd><a data-url="../toUnit"><i class="layui-icon" data-icon=""></i><cite>计量单位</cite></a></dd>
                        <dd><a data-url="../toSupply"><i class="layui-icon" data-icon=""></i><cite>供货商</cite></a></dd>
                        <dd><a data-url="../toType"><i class="layui-icon" data-icon=""></i><cite>药品分类</cite></a></dd>
                        <dd><a data-url="../toDrugdictionary"><i class="layui-icon" data-icon=""></i><cite>药品字典</cite></a>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a><i class="layui-icon" data-icon=""></i><cite>排班管理</cite><span
                        class="layui-nav-more"></span></a>
                    <dl class="layui-nav-child">
                        <dd><a data-url="../toPaiban"><i class="layui-icon" data-icon=""></i><cite>医生排班</cite></a>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a><i class="layui-icon" data-icon=""></i><cite>仓库管理</cite><span
                        class="layui-nav-more"></span></a>
                    <dl class="layui-nav-child">
                        <dd><a data-url="../dsnavigation/beputinstorage"><i class="layui-icon" data-icon=""></i><cite>入库单</cite></a>
                        </dd>
                        <dd><a data-url="../dsnavigation/selectdurg"><i class="layui-icon"
                                                                        data-icon=""></i><cite>库存查询</cite></a></dd>
                        <dd><a data-url="../dsnavigation/selectchuku"><i class="layui-icon"
                                                                         data-icon=""></i><cite>出库单</cite></a></dd>
                        <dd><a data-url="../dsnavigation/selectless"><i class="layui-icon"
                                                                        data-icon=""></i><cite>库存不足</cite></a></dd>
                        <dd><a data-url="../dsnavigation/seldrugDate"><i class="layui-icon" data-icon=""></i><cite>过期提醒</cite></a>
                        </dd>
                        <dd><a data-url="../dsnavigation/record"><i class="layui-icon"
                                                                    data-icon=""></i><cite>操作记录</cite></a></dd>
                        <dd><a data-url="../dsnavigation/recycle"><i class="layui-icon"
                                                                     data-icon=""></i><cite>药品回收</cite></a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a><i class="layui-icon" data-icon=""></i><cite>药房管理</cite><span
                        class="layui-nav-more"></span></a>
                    <dl class="layui-nav-child">
                        <dd><a data-url="../dsnavigation/pharymacyhtml"><i class="layui-icon" data-icon=""></i><cite>药房详情</cite></a>
                        </dd>
                        <dd><a data-url="../caotake/seltake"><i class="layui-icon" data-icon=""></i><cite>门诊取药</cite></a>
                        </dd>
                        <dd><a data-url="../liao/pharmacy"><i class="layui-icon"
                                                              data-icon=""></i><cite>住院取药</cite></a></dd>
                    </dl>
                </li>
                <span class="layui-nav-bar"></span></ul>
        </div>
    </div>
    <!-- 右侧内容 -->
    <div class="layui-body layui-form">
        <div class="layui-tab mag0" lay-filter="bodyTab" id="top_tabs_box">
            <ul class="layui-tab-title top_tab" id="top_tabs">
                <li class="layui-this" lay-id=""><i class="layui-icon"></i> <cite>后台首页</cite></li>
            </ul>
            <ul class="layui-nav closeBox">
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon caozuo"></i> 页面操作<span
                            class="layui-nav-more"></span></a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" class="refresh refreshThis"><i class="layui-icon"></i>
                            刷新当前</a></dd>
                        <dd><a href="javascript:;" class="closePageOther"><i class="seraph icon-prohibit"></i> 关闭其他</a>
                        </dd>
                        <dd><a href="javascript:;" class="closePageAll"><i class="seraph icon-guanbi"></i> 关闭全部</a></dd>
                    </dl>
                </li>
                <span class="layui-nav-bar"></span></ul>
            <div class="layui-tab-content clildFrame">
                <div class="layui-tab-item layui-show">
                    <iframe th:src="@{/page/main}"></iframe>
                </div>
            </div>
        </div>
    </div>
    <!-- 底部 -->
    <div class="layui-footer footer">
        <p><span></span></p>
    </div>
</div>

<!-- 移动导航 -->
<div class="site-tree-mobile"><i class="layui-icon"></i></div>
<div class="site-mobile-shade"></div>
<script type="text/javascript" th:src="@{/hospital/layui/layui.js}"></script>


<script type="text/javascript">
    var $, tab, dataStr, layer;
    layui.config({
        base: "../js/"
    }).extend({
        "bodyTab": "bodyTab"
    })
    layui.use(['bodyTab', 'form', 'element', 'layer', 'jquery'], function () {
        var form = layui.form,
            element = layui.element;
        $ = layui.$;
        layer = parent.layer === undefined ? layui.layer : top.layer;
        tab = layui.bodyTab({
            openTabNum: "50",  //最大可打开窗口数量
            url: ""//获取菜单json地址
        });

        function countdown() {
            var myDate = new Date();
            //获取当前年
            var year = myDate.getFullYear();
            //获取当前月
            var month = myDate.getMonth() + 1;
            //获取当前日
            var date = myDate.getDate();
            var h = myDate.getHours();       //获取当前小时数(0-23)
            var m = myDate.getMinutes();     //获取当前分钟数(0-59)
            var s = myDate.getSeconds();
            var now = year + '年' + getNow(month) + '月' + getNow(date) + "日     " + getNow(h) + ':' + getNow(m) + ":" + getNow(s);
            // 赋值给展示时间
            $('#time').text(now);
        }

        // 获取当前时间
        function getNow(s) {
            return s < 10 ? '0' + s : s;
        }

        setInterval(function () {
            countdown()
        }, 1000);

        //通过顶部菜单获取左侧二三级菜单   注：此处只做演示之用，实际开发中通过接口传参的方式获取导航数据
        function getData(json) {
            $.getJSON(tab.tabConfig.url, function (data) {
                dataStr = data;
                //重新渲染左侧菜单
                tab.render();
            })
        }

        //页面加载时判断左侧菜单是否显示
        //通过顶部菜单获取左侧菜单
        $(".topLevelMenus li,.mobileTopLevelMenus dd").click(function () {
            if ($(this).parents(".mobileTopLevelMenus").length != "0") {
                $(".topLevelMenus li").eq($(this).index()).addClass("layui-this").siblings().removeClass("layui-this");
            } else {
                $(".mobileTopLevelMenus dd").eq($(this).index()).addClass("layui-this").siblings().removeClass("layui-this");
            }
            $(".layui-layout-admin").removeClass("showMenu");
            $("body").addClass("site-mobile");
            getData($(this).data("menu"));
            //渲染顶部窗口
            tab.tabMove();
        })

        //隐藏左侧导航
        $(".hideMenu").click(function () {
            if ($(".topLevelMenus li.layui-this a").data("url")) {
                layer.msg("此栏目状态下左侧菜单不可展开");  //主要为了避免左侧显示的内容与顶部菜单不匹配
                return false;
            }
            $(".layui-layout-admin").toggleClass("showMenu");
            //渲染顶部窗口
            tab.tabMove();
        })

        //通过顶部菜单获取左侧二三级菜单   注：此处只做演示之用，实际开发中通过接口传参的方式获取导航数据
        getData("contentManagement");

        //手机设备的简单适配
        $('.site-tree-mobile').on('click', function () {
            $('body').addClass('site-mobile');
        });
        $('.site-mobile-shade').on('click', function () {
            $('body').removeClass('site-mobile');
        });

        // 添加新窗口
        $("body").on("click", ".layui-nav .layui-nav-item a:not('.mobileTopLevelMenus .layui-nav-item a')", function () {
            //如果不存在子级
            if ($(this).siblings().length == 0) {
                addTab($(this));
                $('body').removeClass('site-mobile');  //移动端点击菜单关闭菜单层
            }
            $(this).parent("li").siblings().removeClass("layui-nav-itemed");
        })


        //刷新后还原打开的窗口
        var cacheStr;
        if (cacheStr == "true") {
            if (window.sessionStorage.getItem("menu") != null) {
                menu = JSON.parse(window.sessionStorage.getItem("menu"));
                curmenu = window.sessionStorage.getItem("curmenu");
                var openTitle = '';
                for (var i = 0; i < menu.length; i++) {
                    openTitle = '';
                    if (menu[i].icon) {
                        if (menu[i].icon.split("-")[0] == 'icon') {
                            openTitle += '<i class="seraph ' + menu[i].icon + '"></i>';
                        } else {
                            openTitle += '<i class="layui-icon">' + menu[i].icon + '</i>';
                        }
                    }
                    openTitle += '<cite>' + menu[i].title + '</cite>';
                    openTitle += '<i class="layui-icon layui-unselect layui-tab-close" data-id="' + menu[i].layId + '">&#x1006;</i>';
                    element.tabAdd("bodyTab", {
                        title: openTitle,
                        content: "<iframe src='" + menu[i].href + "' data-id='" + menu[i].layId + "'></frame>",
                        id: menu[i].layId
                    })
                    //定位到刷新前的窗口
                    if (curmenu != "undefined") {
                        if (curmenu == '' || curmenu == "null") {  //定位到后台首页
                            element.tabChange("bodyTab", '');
                        } else if (JSON.parse(curmenu).title == menu[i].title) {  //定位到刷新前的页面
                            element.tabChange("bodyTab", menu[i].layId);
                        }
                    } else {
                        element.tabChange("bodyTab", menu[menu.length - 1].layId);
                    }
                }
                //渲染顶部窗口
                tab.tabMove();
            }
        } else {
            window.sessionStorage.removeItem("menu");
            window.sessionStorage.removeItem("curmenu");
        }

    })

    //打开新窗口
    function addTab(_this) {
        tab.tabAdd(_this);
    }

</script>


</body>
</html>